

let axios = require("axios");
let fs = require("fs")





;
(async () => {
    // let ret = await axios.get("https://www.dota2.com.cn/itemscategory/json")
    // if(ret.data){
    //     fs.writeFileSync("./cache/items.json", JSON.stringify(ret.data.result))
    // }
    let ret = await axios.get("https://www.dota2.com.cn/items/json?callback=HeropediaDFReceive")
    if(ret.data){
        fs.writeFileSync("./cache/items_data.json", ret.data.itemdata , "utf-8")
    }
})();

// Accept: text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01
// Accept-Encoding: gzip, deflate, br
// Accept-Language: zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7
// Connection: keep-alive
// Cookie: DOTA2=84f62d24faab780abd71e412cd97c294; isLogin=0; Hm_lvt_fa320491e2708f227dc55873588057c5=1668394208; Hm_lpvt_fa320491e2708f227dc55873588057c5=1668394208; __mtxud=0700d84c80f6b946.1668394208055.1668394208055.1668394208055.1; __mtxsd=7197668a.1668394208055.0.1; __mtxsr=csr:www.baidu.com|cdt:/link|advt:(none)|camp:(none); __mtxcar=www.baidu.com:/link
// Host: www.dota2.com.cn
// Referer: https://www.dota2.com.cn/items/index.htm
// Sec-Fetch-Dest: empty
// Sec-Fetch-Mode: cors
// Sec-Fetch-Site: same-origin
// User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36
// X-Requested-With: XMLHttpRequest